<?php
require_once "db.php";

$covers_query_text = "SELECT picture_url FROM movies WHERE past_present_future=1 OR past_present_future=4 ORDER BY RAND() LIMIT 5";
$covers_query = db_query($covers_query_text);
$covers_array = array();
while ($row = mysqli_fetch_assoc($covers_query)) {
	$covers_array[] = $row['picture_url'];
}
echo json_encode($covers_array);

